<?php
/*
 * Zoznam tem pre ucitela s moznostou upravy tem a priradenia ziakov
 * k temam alebo moznost prerozdelenia nahodne zakom ktory este temu nemaju.
 */

$pole=mysql_fetch_array($functs->select_zadanie($_GET["edit"]));

?>


<div id="head-uc-zoznam-upravy"></div>



<div id="topm-u">
    <div id="head-uc-zoznam-zmeny"></div>
</div>

<div id="topm-m">
  <table id="tab" cellspacing="0" cellpading="0">
    <tr style="background:none;">
      <th colspan="5"></th>
    </tr>    
    <tr style="background:none;">
      <td colspan="5">
        
        <form action="?" method="post" name="zad">
          <table id="tab-add">
            <tr><th colspan="2"><div id="head-uc-zoznam-edit"></div></th></tr>
            <tr>
              <td><div id="head-uc-zoznam-nazov"></div></td>
              <td> <input class="vstup" type="text" name="name" value="<?php echo $pole["nazov_zadania"];?>"/><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-text"></div> </td>
              <td><input class="vstup" type="text" name="name"/><input class="pridaj" type="submit" name="pridaj" value="<?php echo $pole["text_zadania"];?>"/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-student"></div> </td>
              <td><input class="vstup" type="text" name="name"/><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-poziadavky"></div></td>
              <td> 
                <textarea class="vstup" rows="10" name="request" ><?php echo $pole["request"]; ?></textarea>
                
                <input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-literatura"></div></td>
              <td> <input class="vstup" type="text" name="name"/><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-hodnotenie"></div></td>
              <td> <input class="vstup" type="text" name="name"/><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
          </table>
        </form>
        
      </td>
    </tr> 
  </table>
</div>
<div id="topm-b"></div>








<div id="topm-u">
    <div id="head-uc-zoznam-zmeny"></div>
</div>

<div id="topm-m">
  <table id="tab" cellspacing="0" cellpading="0">
    <tr style="background:none;">
      <th colspan="5"></th>
    </tr>    
    <tr style="background:none;">
      <td colspan="5">
        
        <form action="?" method="post" name="zad">
          <table id="tab-add">
            <tr><th colspan="2"><div id="head-uc-zoznam-edit"></div></th></tr>
            <tr>
              <td><div id="head-uc-zoznam-meno"></div> <input class="vstup" type="text" name="name"/></td>
              <td><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-meno"></div> <input class="vstup" type="text" name="name"/></td>
              <td><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-meno"></div> <input class="vstup" type="text" name="name"/></td>
              <td><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
            <tr>
              <td><div id="head-uc-zoznam-meno"></div> <input class="vstup" type="text" name="name"/></td>
              <td><input class="pridaj" type="submit" name="pridaj" value=" "/></td>
            </tr>
          </table>
        </form>
        
      </td>
    </tr> 
  </table>
</div>
<div id="topm-b"></div>









<form action="?mod=zadania" method="post">
  <table id="tab">
    <tr><th colspan="5">Zmena zadania:</th></tr>
    <tr>
      <td>Názov: </td>
      <td>
        <input class="stoperc" type="text" name="name" value="<?php echo $pole["name"]; ?>"/>
        <input type="hidden" name="id" value="<?php echo $_GET["edit"]; ?>"/>
      </td>
    </tr>

    <tr>
      <td class="top">Text:</td>
      <td><textarea class="stoperc" rows="10" name="text" ><?php echo $pole["text"]; ?></textarea></td>
    </tr>

    <tr>
      <td colspan="2" align="center"><input type="submit" name="submit" value="Uprav"/></td>
    </tr>

    <tr>
      <td>Študent:</td>
      <td>
        <select name="student"  class="stoperc">
          <option value="0">Žiadny</option>
          <?php
            $res=$functs->select_student("");
            while($pol=mysql_fetch_array($res)){
              if($pol["id"]==$pole["studid"])$ch='selected="selected"';else $ch="";
              echo '<option '.$ch.' value="'.$pol["id"].'">'.$pol["name"].'</option>';
            }
          ?>
        </select>
      </td>
    </tr>

    <tr>
      <td class="top">Požiadavky:</td>
      <td><textarea class="stoperc" rows="10" name="request" ><?php echo $pole["request"]; ?></textarea></td>
    </tr>

    <tr>
      <td colspan="2" align="center"><input type="submit" name="submit" value="Uprav"/></td>
    </tr>

    <tr>
      <td class="top">Literatúra:</td>
      <td><textarea class="stoperc" rows="10" name="liter" ><?php echo $pole["liter"]; ?></textarea></td>
    </tr>

    <tr>
      <td colspan="2" align="center"><input type="submit" name="submit" value="Uprav"/></td>
    </tr>

    <tr>
      <td>Hodnotenie: </td>
      <td><input class="stoperc" type="text" name="eval" value="<?php echo $pole["eval"]; ?>"/></td>
    </tr>

    <tr>
      <td colspan="2" align="center"><input type="submit" name="submit" value="Uprav"/></td>
    </tr>
  </table>
</form>